export default function (options) {
  // 屏蔽右键菜单
  document.oncontextmenu = function (event) {
    if (window.event) {
      event = window.event
    } try {
      const the = event.srcElement
      if (!((the.tagName === 'INPUT' && the.type.toLowerCase() === 'text') || the.tagName === 'TEXTAREA')) {
        return false
      }
      return true
    } catch (e) {
      return false
    }
  }
  // 屏蔽选中
  document.onselectstart = function (event) {
    if (window.event) {
      event = window.event
    } try {
      const the = event.srcElement
      if (!((the.tagName === 'INPUT' && the.type.toLowerCase() === 'text') || the.tagName === 'TEXTAREA')) {
        return false
      }
      return true
    } catch (e) {
      return false
    }
  }
}
